@page
@{ Layout = "_LayoutApp"; }

@section Styles{
    <style>
        .el-form-item {
            margin-bottom: 0px;
        }
    </style>
}
<div style="position:fixed;left:0;top:0;width:100%;" class="text-center py-3 bg-white z-1">
    模拟自测
</div>
<div class="pb-8"></div>
<div class="z-2">
    <div class="mb-3">
        <el-input prefix-icon="el-icon-search" clearable placeholder="关键字查询" v-model="form.keyWords">
            <el-button slot="append" icon="el-icon-search" v-on:click="btnSearchClick">查 询</el-button>
        </el-input>
    </div>
    <div v-if="total>0">
        <div v-for="(paper,index) in list" v-on:click="btnViewClick(paper.id)">
            <el-card shadow="hover" class="mb-3">
                <div slot="header">
                    <div class="fw-bold">{{ paper.title }}</div>
                </div>
                <div class="d-flex justify-content-between align-items-center">
                    <div>
                        <div class="position-relative">
                            <i class="bi bi-person-check fs-1 rounded-3 px-1 card-icon"></i>
                            <span class="position-absolute top-100 start-50 translate-middle mt-2 fs-6">{{ index+1 }}</span>
                        </div>
                    </div>
                    <div>
                        <div class="fs-5">
                            <div class="mb-1">总分：{{paper.totalScore}}</div>
                            <div class="mb-1">及格分：{{paper.passScore}}</div>
                            <div class="mb-1">
                                考试次数：
                                <span class="text-success fw-bold" v-if="(paper.userExamTimes-paper.myExamTimes)>0">
                                    {{paper.userExamTimes-paper.myExamTimes}}
                                </span>
                                <span class="fs-3 text-danger fw-bold" v-else>
                                    0
                                </span>
                                /{{paper.userExamTimes}}
                            </div>
                        </div>
                    </div>
                    <div>
                        <div class="bg-light p-2 rounded-circle">
                            <el-button type="primary" circle icon="el-icon-s-order" class="p-3 fs-3" v-on:click.stop="btnViewClick(paper.id)"></el-button>
                        </div>
                    </div>
                </div>
            </el-card>
        </div>
        <div class="my-5 text-center">
            <el-button size="small" icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-button>
            <span v-else class="fw-light fs-6">没有更多了</span>
        </div>
    </div>
    <div class="pt-10" v-else>
        <el-empty></el-empty>
    </div>
</div>
<div class="py-8"></div>
<div style="position:fixed;left:0;bottom:0;width:100%;" class="text-center mb-5 animate__animated animate__fadeInUp">
    <el-button-group class="btn-group p-1 bg-gray-300 rounded-pill">
        <el-button v-on:click="location.href=utils.getIndexUrl()" icon="el-icon-back" class="rounded-pill" type="primary">返 回</el-button>
    </el-button-group>
</div>
@section Scripts{
    <script src="/sitefiles/assets/js/app/exam/examPaperMoni.js" type="text/javascript"></script>
}